<?php
	echo $this -> Html -> script(array('mcategory.js'));
?>
<div id="mainContent">
<?php
	echo $this -> Form -> create('Category', array('id' => 'frmUpdate', 'url' => 'update', 'method' => 'post', 'data-ajax' => 'false'));
?>
    <!--  start content-table-inner -->
	<div id="content-table-inner">
        <table border="0" width="100%" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <th valign="top">Tên nhóm</th>
                    <td>
                    	<?php 
                    		echo $this -> Form -> input('name', array('type' => 'text', 'label' => '', 'value' => $updatedItem['Category']['name'], 'class' => 'inp-form validate[required,maxSize[100]]', 'maxlength' => 100));
                    	?>
                    </td>
                </tr>
                <tr>
                    <th valign="top">Mô tả</th>
                    <td>
	                    <?php 
	                    	echo $this -> Form -> textarea('description', array('label' => '', 'value' => $updatedItem['Category']['description'], 'class' => 'inp-form validate[maxSize[100]]'));
	                    ?>
                    </td>
                </tr>
                <tr>
                    <th valign="top">Trạng thái</th>
                    <td>
                    <select name='data[Category][status]'>
                    	<?php 
                    	if($updatedItem['Category']['status'] == '1') {
                    		echo "<option value='1' selected='selected' >Bật</option>";
                    		echo "<option value='0' >Tắt</option>";
                    	} else {
                    		echo "<option value='1' >Bật</option>";
                    		echo "<option value='0' selected='selected' >Tắt</option>";
                    	}
                    	?>
                    </select>
                    </td>
                </tr>
            </tbody>
        </table>
        <?php 
        	echo $this -> Form -> input('id', array('type' => 'hidden', 'label' => '', 'value' => $updatedItem['Category']['id']));
            echo $this -> Form -> input('toporder', array('type' => 'hidden', 'label' => '', 'value' => $updatedItem['Category']['toporder']));
        ?>
        <p>
        	<?php 
            	echo $this -> Form -> input('save', array('label' => '', 'type' => 'submit', 'value' => 'Lưu', 'name' => 'save' ));
            ?>
        </p>
        <br />
        <br />
        <p><a href="JavaScript:history.back()">Quay lại</a></p>
    </div>
<?php echo $this -> Form -> end(); ?>
</div>